<?php
	/**
	 * Created by JetBrains PhpStorm.
	 * User: alex
	 * Date: 06.08.13
	 * Time: 16:17
	 * To change this template use File | Settings | File Templates.
	 */
class Model_Cart extends Model_Default
{
	public
	function selectProductInCart($idStr = "0,1")
	{
		$idStr = preg_replace('/[^0-9,]/', " ", $idStr);
		$sql = <<<SQL
                   SELECT
                      *
                   FROM
                      Tovar
                   WHERE
                      id in ($idStr)

SQL;

		$db = $this->dbh();
		$stmt = $db->query($sql);
		$result = $stmt->fetchAll(PDO::FETCH_ASSOC);

		return $result;
	}
}
